package com.study.service.impl;

import com.study.bean.Telephone_new;
import com.study.dao.impl.Telephone_newDaoImpl;
import com.study.service.Telephone_newService;

import java.sql.SQLException;
import java.util.List;

public class Telephone_newServiceImpl implements Telephone_newService {

    private static Telephone_newDaoImpl telDao;
    static {
         telDao = new Telephone_newDaoImpl();
    }
    @Override
    public int add(Telephone_new t) throws SQLException {
        return telDao.add(t) ;
    }

    @Override
    public int del(Integer id) throws SQLException {
        return  telDao.del(id);
    }

    @Override
    public int update(Telephone_new t) throws SQLException {
        return telDao.update(t);
    }

    @Override
    public List<Telephone_new> seletByName(String name) throws SQLException {
        return telDao.seletByName(name);
    }

    @Override
    public List<Telephone_new> selectAll() throws SQLException {
        return telDao.selectAll();
    }

    @Override
    public Telephone_new selectById(Integer id) throws SQLException {
        return telDao.selectById(id);
    }
}
